package com.yf.bean;

import com.yf.utils.Utils;
import lombok.Data;

import java.sql.Timestamp;

@Data
public class AnswerBean {
    Integer id;
    Integer uid;
    Integer pid;
    Short valid;
    String answer;
    Timestamp created;

    public boolean validate() {
        return Utils.isNullOrEmpty(answer) || answer.length() <= 2048;
    }

    public AnswerBean() {
        valid = (short) 1;
        created = Utils.currentTime();
    }

}
